<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>Jin Tian</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
  
  
  
  <meta name="description" content="百度开放可定制化图像识别平台，构建深度学习应用只需几秒最近百度开放了一个可定制化的图像识别平台，传送门在此：http://ai.baidu.com/customize/ 。百度在此平台上实现了多个可以实际落地化的图像识别细化场景，比如餐饮菜品识别、人工智能安防人体检测、动植物品种识别等，种类繁多分门别类，最为重要的是，每个可落地化的场景还支持模型再训练和定制化！这对于广大人工智能从业者和企业来说都">
<meta property="og:type" content="article">
<meta property="og:title" content="Jin Tian">
<meta property="og:url" content="http://yoursite.com/2018/03/05/1.百度开放可定制化图像识别平台，构建深度学习应用只需几秒/index.html">
<meta property="og:site_name" content="Jin Tian">
<meta property="og:description" content="百度开放可定制化图像识别平台，构建深度学习应用只需几秒最近百度开放了一个可定制化的图像识别平台，传送门在此：http://ai.baidu.com/customize/ 。百度在此平台上实现了多个可以实际落地化的图像识别细化场景，比如餐饮菜品识别、人工智能安防人体检测、动植物品种识别等，种类繁多分门别类，最为重要的是，每个可落地化的场景还支持模型再训练和定制化！这对于广大人工智能从业者和企业来说都">
<meta property="og:locale" content="zh-CN">
<meta property="og:image" content="http://yoursite.com/Users/jintian/Library/Containers/com.tencent.xinWeChat/Data/Library/Application%20Support/com.tencent.xinWeChat/2.0b4.0.9/c007fc43fb2a0e4409f30f4711b26a4b/Message/MessageTemp/f42203ca4aa7873a978b2509621aac5c/Image/3451520247944_.pic_hd.jpg">
<meta property="og:updated_time" content="2018-03-05T11:08:50.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Jin Tian">
<meta name="twitter:description" content="百度开放可定制化图像识别平台，构建深度学习应用只需几秒最近百度开放了一个可定制化的图像识别平台，传送门在此：http://ai.baidu.com/customize/ 。百度在此平台上实现了多个可以实际落地化的图像识别细化场景，比如餐饮菜品识别、人工智能安防人体检测、动植物品种识别等，种类繁多分门别类，最为重要的是，每个可落地化的场景还支持模型再训练和定制化！这对于广大人工智能从业者和企业来说都">
<meta name="twitter:image" content="http://yoursite.com/Users/jintian/Library/Containers/com.tencent.xinWeChat/Data/Library/Application%20Support/com.tencent.xinWeChat/2.0b4.0.9/c007fc43fb2a0e4409f30f4711b26a4b/Message/MessageTemp/f42203ca4aa7873a978b2509621aac5c/Image/3451520247944_.pic_hd.jpg">
  
    <link rel="alternate" href="/atom.xml" title="Jin Tian" type="application/atom+xml">
  

  

  <link rel="icon" href="/css/images/mylogo.jpg">
  <link rel="apple-touch-icon" href="/css/images/mylogo.jpg">
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link href="https://fonts.googleapis.com/css?family=Open+Sans|Montserrat:700" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic" rel="stylesheet" type="text/css">
  <link href="//cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
  <style type="text/css">
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/9749f0/00000000000000000001008f/27/l?subset_id=2&fvd=n5) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/90cf9f/000000000000000000010091/27/l?subset_id=2&fvd=n7) format("woff2");font-weight:500;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/8a5494/000000000000000000013365/27/l?subset_id=2&fvd=n4) format("woff2");font-weight:lighter;font-style:normal;}
    @font-face{font-family:futura-pt;src:url(https://use.typekit.net/af/d337d8/000000000000000000010095/27/l?subset_id=2&fvd=i4) format("woff2");font-weight:400;font-style:italic;}</style>
  <link rel="stylesheet" href="/css/style.css">

  <script src="/js/jquery-3.1.1.min.js"></script>
  <script src="/js/bootstrap.js"></script>

  <!-- Bootstrap core CSS -->
  <link rel="stylesheet" href="/css/bootstrap.css" >

  
    <link rel="stylesheet" href="/css/dialog.css">
  

  

  
    <link rel="stylesheet" href="/css/header-post.css" >
  

  
  
  
    <link rel="stylesheet" href="/css/vdonate.css" >
  

</head>



  <body data-spy="scroll" data-target="#toc" data-offset="50">


  
  <div id="container">
    <div id="wrap">
      
        <header>

    <div id="allheader" class="navbar navbar-default navbar-static-top" role="navigation">
        <div class="navbar-inner">
          
          <div class="container"> 
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>

            
              <a class="brand" style="
                 border-width: 0px;  margin-top: 0px;"  
                href="#" data-toggle="modal" data-target="#myModal" >
                  <img width="124px" height="124px" alt="Hike News" src="/css/images/mylogo.jpg">
              </a>
            
            
            <div class="navbar-collapse collapse">
              <ul class="hnav navbar-nav">
                
                  <li> <a class="main-nav-link" href="/">首页</a> </li>
                
                  <li> <a class="main-nav-link" href="/archives">归档</a> </li>
                
                  <li> <a class="main-nav-link" href="/categories">分类</a> </li>
                
                  <li> <a class="main-nav-link" href="/tags">标签</a> </li>
                
                  <li> <a class="main-nav-link" href="/about">关于</a> </li>
                
                  <li> <a class="main-nav-link" href="http://luoli-luoli.com/chat">chat</a> </li>
                
                  <li><div id="search-form-wrap">

    <form class="search-form">
        <input type="text" class="ins-search-input search-form-input" placeholder="" />
        <button type="submit" class="search-form-submit"></button>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="请输入关键词..." />
            <span class="ins-close ins-selectable"><i class="fa fa-times-circle"></i></span>
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>
<script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(无标题)',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>

</div></li>
            </div>
          </div>
                
      </div>
    </div>

</header>



      
            
      <div id="content" class="outer">
        
          <section id="main" style="float:none;"><article id="post-1.百度开放可定制化图像识别平台，构建深度学习应用只需几秒" style="width: 75%; float:left;" class="article article-type-post" itemscope itemprop="blogPost" >
  <div id="articleInner" class="article-inner">
    
    
    <div class="article-meta">
      
	<a href="/2018/03/05/1.百度开放可定制化图像识别平台，构建深度学习应用只需几秒/" class="article-date">
	  <time datetime="2018-03-05T09:55:53.000Z" itemprop="datePublished">2018-03-05</time>
	</a>

      
      
	<a class="article-views">
	<span id="busuanzi_container_page_pv">
		阅读量<span id="busuanzi_value_page_pv"></span>
	</span>
	</a>

    </div>
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="百度开放可定制化图像识别平台，构建深度学习应用只需几秒"><a href="#百度开放可定制化图像识别平台，构建深度学习应用只需几秒" class="headerlink" title="百度开放可定制化图像识别平台，构建深度学习应用只需几秒"></a>百度开放可定制化图像识别平台，构建深度学习应用只需几秒</h1><p>最近百度开放了一个可定制化的图像识别平台，传送门在此：<a href="http://ai.baidu.com/customize/" target="_blank" rel="noopener">http://ai.baidu.com/customize/</a> 。百度在此平台上实现了多个可以实际落地化的图像识别细化场景，比如餐饮菜品识别、人工智能安防人体检测、动植物品种识别等，种类繁多分门别类，最为重要的是，每个可落地化的场景还支持模型再训练和定制化！这对于广大人工智能从业者和企业来说都是一个巨大的福音。以前花费几十万的安防平台可能只需要一个简单的API就能轻松实现。其中也不乏一些亮点能力，比如<strong>直接识别车的型号功能</strong>，以后可以自己做个APP拍照识别车了，从此再也不用做车盲或者low逼，凯迪拉克摆在前面不认识。</p>
<p>为了让广大开发者对这个平台有一个更加详尽的了解，我在这里给大家详细列举一下，百度这个开放平台到底赋能了哪些东西，并且对于我们来说怎么才能使用到位。</p>
<p>首先抛开大的不说，百度这个平台实际落地的点还是非常focus的，这也和当今深度学习应用的特性有关，也就是说没有一个普适的模型去实现所有的任务。百度此次开发的图像识别平台，大的来说可以分为：<strong>通用图像识别</strong>， <strong>细粒度图像识别</strong>， <strong>人体分析</strong>， <strong>手机端图像识别模型</strong>， <strong>车辆定损检测</strong>，以及最重要的，来自开放平台的可定制化图像识别模型支持。</p>
<p>我将从具体的识别案例以及具体API调用来介绍这么能力怎么被赋能。</p>
<h2 id="通用图像识别"><a href="#通用图像识别" class="headerlink" title="通用图像识别"></a>通用图像识别</h2><p>所谓通用图像识别，其实就是目标检测。个人认为能够实现目标的检测，就说明这个开放的图像识别平台已经是集大成了。该能力主要用于识别主体目标在图像中的区域，也就是物体的检测。本文只是对图像识别平台进行一个大致介绍，将不会对通用图像识别的反应速度做一个测评，具体各个接口能力的速度还请关注另外几篇文章。</p>
<p>该能力的API调用方式为：</p>
<p><code>https://aip.baidubce.com/rest/2.0/image-classify/v1/object_detect</code> </p>
<p>调用方式为<code>POST</code>,  通过百度ai平台的API_KEY以及SECRET_KEY合成access_token, 并将该参数传入url。</p>
<p>其次在传入参数的body中，添加两个参数：</p>
<ul>
<li><code>image</code>: 图像数据的base64编码，string类型</li>
<li><code>with_face</code>: int，0代表检测区域带脸部区域，默认为1，即带人脸</li>
</ul>
<p>最终返回的数据类型为：</p>
<figure class="highlight json"><table><tr><td class="code"><pre><div class="line">&#123;</div><div class="line">  <span class="attr">"log_id"</span>: <span class="number">895582300</span>,</div><div class="line">  <span class="attr">"result"</span>: &#123;</div><div class="line">    <span class="attr">"width"</span>: <span class="number">486</span>,</div><div class="line">    <span class="attr">"top"</span>: <span class="number">76</span>,</div><div class="line">    <span class="attr">"left"</span>: <span class="number">134</span>,</div><div class="line">    <span class="attr">"height"</span>: <span class="number">394</span></div><div class="line">  &#125;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>即，最终结果的四角坐标。log_id指的是问题的定位。</p>
<h2 id="细粒度图像识别"><a href="#细粒度图像识别" class="headerlink" title="细粒度图像识别"></a>细粒度图像识别</h2><p>这个模块具体细分下来，百度实现了许多可以落地场景，我将一一讲解一下。首先是，图像分类本身的细化需求，这就必须要一个细粒度的分类，比如识别花，就应该在更加集中于花识别的数据集上做这个检测。</p>
<h3 id="1-车型识别"><a href="#1-车型识别" class="headerlink" title="1. 车型识别"></a>1. 车型识别</h3><p>这个技能可以说是许多开发者想要的！做一个直接识别车辆型号、品牌、颜色、年份等信息。So here it is！这个能力还是非常赞的。让我们来看看如何调用。</p>
<p>接口地址为：</p>
<figure class="highlight awk"><table><tr><td class="code"><pre><div class="line">https:<span class="regexp">//</span>aip.baidubce.com<span class="regexp">/rest/</span><span class="number">2.0</span><span class="regexp">/image-classify/</span>v1<span class="regexp">/car</span></div></pre></td></tr></table></figure>
<p>同样适用post方法，传入access_token. 在body里面传入参数：</p>
<ul>
<li><code>image</code>: 图像数据，base64编码，要求base64编码后大小不超过4M，最短边至少15px，最长边最大4096px,支持jpg/png/bmp格式;</li>
<li><code>top_num</code>:  识别结果的置信度最高的n个结果，返回结果top n，默认5。</li>
</ul>
<p>最后我们来看看实际返回的数据：</p>
<figure class="highlight json"><table><tr><td class="code"><pre><div class="line">&#123;</div><div class="line">	<span class="attr">"log_id"</span>: <span class="number">513144405</span>,</div><div class="line">	<span class="attr">"result"</span>: [&#123;</div><div class="line">		<span class="attr">"name"</span>: <span class="string">"非车类图片"</span>,</div><div class="line">		<span class="attr">"score"</span>: <span class="number">1</span>,</div><div class="line">		<span class="attr">"year"</span>: <span class="string">"无年份信息"</span></div><div class="line">	&#125;, &#123;</div><div class="line">		<span class="attr">"name"</span>: <span class="string">"宾利慕尚"</span>,</div><div class="line">		<span class="attr">"score"</span>: <span class="number">0</span>,</div><div class="line">		<span class="attr">"year"</span>: <span class="string">"2012"</span></div><div class="line">	&#125;, &#123;</div><div class="line">		<span class="attr">"name"</span>: <span class="string">"众泰M300"</span>,</div><div class="line">		<span class="attr">"score"</span>: <span class="number">0</span>,</div><div class="line">		<span class="attr">"year"</span>: <span class="string">"2009"</span></div><div class="line">	&#125;, &#123;</div><div class="line">		<span class="attr">"name"</span>: <span class="string">"宾利添越"</span>,</div><div class="line">		<span class="attr">"score"</span>: <span class="number">0</span>,</div><div class="line">		<span class="attr">"year"</span>: <span class="string">"2016"</span></div><div class="line">	&#125;, &#123;</div><div class="line">		<span class="attr">"name"</span>: <span class="string">"佩奇奥HEMERA"</span>,</div><div class="line">		<span class="attr">"score"</span>: <span class="number">0</span>,</div><div class="line">		<span class="attr">"year"</span>: <span class="string">"无年份信息"</span></div><div class="line">	&#125;],</div><div class="line">	<span class="attr">"color_result"</span>: <span class="string">"白色"</span></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>这个非常不错，准确度很高啊，有没有车可以被准确识别出来。相信大家看到这个文章之后，就可以着手去做一个app了，名字都想好了，拍照识别。估计会很火，等拿到了融资胜任了CEO别忘了再来给我捐点钱。</p>
<h3 id="2-菜品识别"><a href="#2-菜品识别" class="headerlink" title="2. 菜品识别"></a>2. 菜品识别</h3><p>这个是助力智能餐饮的一个应用。菜品识别可以提供自动识别菜品种的能力，但是除了名称以外还会进一步输出卡路里量！这个也是很好的落地场景啊！让我们来看看如何调用的：</p>
<figure class="highlight awk"><table><tr><td class="code"><pre><div class="line">https:<span class="regexp">//</span>aip.baidubce.com<span class="regexp">/rest/</span><span class="number">2.0</span><span class="regexp">/image-classify/</span>v2<span class="regexp">/dish</span></div></pre></td></tr></table></figure>
<p>同样直接使用post方法进行调用。加上acess_token, 最后需要在body传入的参数有：</p>
<ul>
<li><code>image</code>: Base64编码字符串，以图片文件形式请求时必填。(支持图片格式：jpg，bmp，png，jpeg)，图片大小不超过4M。最短边至少15px，最长边最大4096px;</li>
<li><code>top-num</code>: 返回结果top n,默认5;</li>
<li><code>filter_threshold</code>: 默认0.95，可以通过该参数调节识别效果，降低非菜识别率.</li>
</ul>
<p>返回的具体数据为：</p>
<figure class="highlight json"><table><tr><td class="code"><pre><div class="line">&#123;</div><div class="line"><span class="attr">"log_id"</span>: <span class="number">2471272194</span>, </div><div class="line"><span class="attr">"result_num"</span>: <span class="number">5</span>,</div><div class="line"><span class="attr">"result"</span>: [</div><div class="line">            &#123;</div><div class="line">                <span class="attr">"name"</span>: <span class="string">"烧烤（串类）"</span>,</div><div class="line">                <span class="attr">"calorie"</span>: <span class="number">333.33</span>,</div><div class="line">                <span class="attr">"probability"</span>: <span class="number">0.35874313116074</span></div><div class="line">            &#125;,</div><div class="line">            &#123;</div><div class="line">                <span class="attr">"name"</span>: <span class="string">"鱿鱼"</span>,</div><div class="line">                <span class="attr">"calorie"</span>: <span class="number">333.33</span>,</div><div class="line">                <span class="attr">"probability"</span>: <span class="number">0.20610593259335</span></div><div class="line">            &#125;,</div><div class="line">            &#123;</div><div class="line">                <span class="attr">"name"</span>: <span class="string">"板筋"</span>,</div><div class="line">                <span class="attr">"calorie"</span>: <span class="number">333.33</span>,</div><div class="line">                <span class="attr">"probability"</span>: <span class="number">0.15860831737518</span></div><div class="line">            &#125;,</div><div class="line">            &#123;</div><div class="line">                <span class="attr">"name"</span>: <span class="string">"鸡脆骨"</span>,</div><div class="line">                <span class="attr">"calorie"</span>: <span class="number">333.33</span>,</div><div class="line">                <span class="attr">"probability"</span>: <span class="number">0.077698558568954</span></div><div class="line">            &#125;,</div><div class="line">            &#123;</div><div class="line">                <span class="attr">"name"</span>: <span class="string">"麻辣烫"</span>,</div><div class="line">                <span class="attr">"calorie"</span>: <span class="number">333.33</span>,</div><div class="line">                <span class="attr">"probability"</span>: <span class="number">0.041968926787376</span></div><div class="line">            &#125;</div><div class="line">    ]</div><div class="line"></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>这个识别还是不错的，可以对一张图片的多个菜品进行识别。</p>
<h3 id="3-logo商品识别"><a href="#3-logo商品识别" class="headerlink" title="3. logo商品识别"></a>3. logo商品识别</h3><p>这个logo识别应该支持当今诸多的知名商标，比如nike，肯德基，但是牛逼的是，假如你是一家公司，并不知名的公司，只要具有商标便可以申请入库。从而可以使你的logo能够被检测得到。我们来看看具体如何调用：</p>
<figure class="highlight awk"><table><tr><td class="code"><pre><div class="line">https:<span class="regexp">//</span>aip.baidubce.com<span class="regexp">/rest/</span><span class="number">2.0</span><span class="regexp">/image-classify/</span>v2<span class="regexp">/logo</span></div></pre></td></tr></table></figure>
<p>请求的方式也是post，并且带上acess_token. </p>
<p>body的内容为：</p>
<ul>
<li><code>image</code>: 图像数据，base64编码，要求base64编码后大小不超过4M，最短边至少15px，最长边最大4096px,支持jpg/png/bmp格式;</li>
<li><code>custom_lib</code>: 这是一个bool类型，意思就是是否用自己建的子库，这个子库的建立可以到百度ai平台控制台中进行自行建立。</li>
</ul>
<p>最后这个返回的数据如下：</p>
<figure class="highlight json"><table><tr><td class="code"><pre><div class="line">&#123;</div><div class="line">  <span class="attr">"log_id"</span>: <span class="number">843411868</span>,</div><div class="line">  <span class="attr">"result_num"</span>: <span class="number">1</span>,</div><div class="line">  <span class="attr">"result"</span>: [</div><div class="line">    &#123;</div><div class="line">      <span class="attr">"type"</span>: <span class="number">0</span>,</div><div class="line">      <span class="attr">"name"</span>: <span class="string">"科颜氏"</span>,</div><div class="line">      <span class="attr">"probability"</span>: <span class="number">0.99998807907104</span>,</div><div class="line">      <span class="attr">"location"</span>: &#123;</div><div class="line">        <span class="attr">"width"</span>: <span class="number">296</span>,</div><div class="line">        <span class="attr">"top"</span>: <span class="number">20</span>,</div><div class="line">        <span class="attr">"height"</span>: <span class="number">128</span>,</div><div class="line">        <span class="attr">"left"</span>: <span class="number">23</span></div><div class="line">      &#125;</div><div class="line">    &#125;</div><div class="line">  ]</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<p>显示的是logo的名字以及概率，还有该logo所在的位置。可以说功能非常强大了。</p>
<h3 id="4-动物识别"><a href="#4-动物识别" class="headerlink" title="4. 动物识别"></a>4. 动物识别</h3><p>这个api应该不用多说，传入一张图片，识别出该图片的动物品种。还记得以前微软识花的app吗？现在你也可以开发一个app，叫做某某识马，xx识狗了，真正AI赋能的一种体现啊！这个调用依旧很简单，调用的url为：</p>
<figure class="highlight awk"><table><tr><td class="code"><pre><div class="line">https:<span class="regexp">//</span>aip.baidubce.com<span class="regexp">/rest/</span><span class="number">2.0</span><span class="regexp">/image-classify/</span>v1<span class="regexp">/animal</span></div></pre></td></tr></table></figure>
<p>传入body参数为：</p>
<ul>
<li><code>image</code>: 图像数据，base64编码，要求base64编码后大小不超过4M，最短边至少15px，最长边最大4096px,支持jpg/png/bmp格式;</li>
<li><code>top_num</code>:  识别结果的置信度最高的n个结果，返回结果top n，默认5。</li>
</ul>
<p>返回数据的结果为：</p>
<figure class="highlight json"><table><tr><td class="code"><pre><div class="line">&#123;</div><div class="line">	<span class="attr">"log_id"</span>: <span class="number">304829369</span>,</div><div class="line">	<span class="attr">"result"</span>: [</div><div class="line">  	&#123;</div><div class="line">    	<span class="attr">"name"</span>: <span class="string">"蒙古马"</span>,</div><div class="line">    	<span class="attr">"score"</span>: <span class="number">0.41471540927887</span></div><div class="line">  	&#125;,</div><div class="line">  	&#123;</div><div class="line">    	<span class="attr">"name"</span>: <span class="string">"伊犁马"</span>,</div><div class="line">    	<span class="attr">"score"</span>: <span class="number">0.39988899230957</span></div><div class="line">  	&#125;,</div><div class="line">  	&#123;</div><div class="line">    	<span class="attr">"name"</span>: <span class="string">"哈萨克马"</span>,</div><div class="line">    	<span class="attr">"score"</span>: <span class="number">0.39988899230957</span></div><div class="line">  	&#125;</div><div class="line">  	...</div><div class="line">	]</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h3 id="5-植物识别"><a href="#5-植物识别" class="headerlink" title="5. 植物识别"></a>5. 植物识别</h3><p>这个个人认为更有用，因为女孩子喜欢旅游，喜欢花花草草，这个时候你如果有一个人工智能去识别它们，那……（此处大家可脑补）。不管怎么说，大家熟悉了百度识别平台的套路之后，你会发现真的有很多玩法啊！！！甚至可以帮你脱单，被无数妹子所仰慕，最终胜任CEO，走向人生巅峰…醒醒，现在是白天，我们继续码代码吧…</p>
<p>闲话不多说，api接口地址为：</p>
<figure class="highlight awk"><table><tr><td class="code"><pre><div class="line">https:<span class="regexp">//</span>aip.baidubce.com<span class="regexp">/rest/</span><span class="number">2.0</span><span class="regexp">/image-classify/</span>v1<span class="regexp">/plant</span></div></pre></td></tr></table></figure>
<p>传入body参数为：</p>
<ul>
<li><code>image</code>: 图像数据，base64编码，要求base64编码后大小不超过4M，最短边至少15px，最长边最大4096px,支持jpg/png/bmp格式;</li>
</ul>
<p>返回数据的结果为：</p>
<figure class="highlight json"><table><tr><td class="code"><pre><div class="line">&#123;</div><div class="line">	<span class="attr">"log_id"</span>: <span class="number">304829369</span>,</div><div class="line">	<span class="attr">"result"</span>: [</div><div class="line"> 	&#123;</div><div class="line">    	<span class="attr">"name"</span>: <span class="string">"吉娃莲"</span>,</div><div class="line">    	<span class="attr">"score"</span>: <span class="number">0.41471540927887</span></div><div class="line">  	&#125;,</div><div class="line">  	&#123;</div><div class="line">    	<span class="attr">"name"</span>: <span class="string">"番杏科"</span>,</div><div class="line">    	<span class="attr">"score"</span>: <span class="number">0.39988899230957</span></div><div class="line">  	&#125;,</div><div class="line"> 	&#123;</div><div class="line">    	<span class="attr">"name"</span>: <span class="string">"花月夜"</span>,</div><div class="line">    	<span class="attr">"score"</span>: <span class="number">0.39988899230957</span></div><div class="line">  	&#125;</div><div class="line">  	...</div><div class="line">	]</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="定制化图像识别"><a href="#定制化图像识别" class="headerlink" title="定制化图像识别"></a>定制化图像识别</h2><p>最后这个模块是定制化的图像识别，这个所在地址为： <a href="http://ai.baidu.com/customize/app/model/" target="_blank" rel="noopener">http://ai.baidu.com/customize/app/model/</a> 。可以可视化的定制自己的模型：</p>
<p><img src="/Users/jintian/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/c007fc43fb2a0e4409f30f4711b26a4b/Message/MessageTemp/f42203ca4aa7873a978b2509621aac5c/Image/3451520247944_.pic_hd.jpg" alt=""></p>
<p>大家可以创建模型、训练模型、校验模型，非常方便的部署和测试。</p>
<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>最后总结一下，这个百度开放的可定制化图像识别平台给予了普通开发者许多的AI功能，而这些跟我们的实际业务场景有着千丝万缕的联系，是人工智能实际应用场景落地的伟大尝试。非常期待百度陆续推出更多赋能的ai能力，让普通的app开发者能够更加快速的上手如此专业的ai功能，让app乘上人工智能的快车道！</p>

      
    </div>
    <footer class="article-footer">
      
        <div id="donation_div"></div>

<script src="/js/vdonate.js"></script>
<script>
var a = new Donate({
  title: '骚年，加个好友打赏一下啊，现在连泡面都吃不起了啊', // 可选参数，打赏标题
  btnText: '打赏支持', // 可选参数，打赏按钮文字
  el: document.getElementById('donation_div'),
  wechatImage: 'https://i.loli.net/2017/09/27/59cb048ba6838.jpeg',
  alipayImage: 'https://i.loli.net/2017/09/27/59cb049cd0951.jpeg'
});
</script>
      
      
        
	<div id="comment">
		<!-- 来必力City版安装代码 -->
		<div id="lv-container" data-id="city" data-uid="MTAyMC8zMDA5MC82NjQ1">
		<script type="text/javascript">
		   (function(d, s) {
		       var j, e = d.getElementsByTagName(s)[0];

		       if (typeof LivereTower === 'function') { return; }

		       j = d.createElement(s);
		       j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
		       j.async = true;

		       e.parentNode.insertBefore(j, e);
		   })(document, 'script');
		</script>
		<noscript>为正常使用来必力评论功能请激活JavaScript</noscript>
		</div>
		<!-- City版安装代码已完成 -->
	</div>



      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2018/03/05/3.3分钟从零开始搭建一个微软识花深度学习应用/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">上一篇</strong>
      <div class="article-nav-title">
        
          3.3分钟从零开始搭建一个微软识花深度学习应用
        
      </div>
    </a>
  
  
    <a href="/2018/03/03/伯爵返利机器人-通向用AI自动赚钱之路/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">下一篇</strong>
      <div class="article-nav-title">伯爵返利机器人-通向用AI自动赚钱之路</div>
    </a>
  
</nav>

  
</article>

<!-- Table of Contents -->

  <aside id="toc-sidebar">
    <div id="toc" class="toc-article">
    <strong class="toc-title">文章目录</strong>
    
        <ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#百度开放可定制化图像识别平台，构建深度学习应用只需几秒"><span class="nav-number">1.</span> <span class="nav-text">百度开放可定制化图像识别平台，构建深度学习应用只需几秒</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#通用图像识别"><span class="nav-number">1.1.</span> <span class="nav-text">通用图像识别</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#细粒度图像识别"><span class="nav-number">1.2.</span> <span class="nav-text">细粒度图像识别</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-车型识别"><span class="nav-number">1.2.1.</span> <span class="nav-text">1. 车型识别</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-菜品识别"><span class="nav-number">1.2.2.</span> <span class="nav-text">2. 菜品识别</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-logo商品识别"><span class="nav-number">1.2.3.</span> <span class="nav-text">3. logo商品识别</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-动物识别"><span class="nav-number">1.2.4.</span> <span class="nav-text">4. 动物识别</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-植物识别"><span class="nav-number">1.2.5.</span> <span class="nav-text">5. 植物识别</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#定制化图像识别"><span class="nav-number">1.3.</span> <span class="nav-text">定制化图像识别</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#总结"><span class="nav-number">1.4.</span> <span class="nav-text">总结</span></a></li></ol></li></ol>
    
    </div>
  </aside>
</section>
        
      </div>
      
      <footer id="footer">
  

  <div class="container">
      	<div class="row">
	      <p> Powered by <a href="http://www.luoli-luoli.com/" target="_blank">萝莉萝莉</a> and <a href="http://www.luoli-luoli.com/sia" target="_blank">Sia</a> </p>
	      <p id="copyRightEn">Copyright &copy; 2017 - 2018 Jin Tian All Rights Reserved.</p>
	      
	      
    		<p class="busuanzi_uv">
				访客数 : <span id="busuanzi_value_site_uv"></span> |  
				访问量 : <span id="busuanzi_value_site_pv"></span>
		    </p>
  		   
		</div>

		
  </div>
</footer>


<!-- min height -->

<script>
    var wrapdiv = document.getElementById("wrap");
    var contentdiv = document.getElementById("content");
    var allheader = document.getElementById("allheader");

    wrapdiv.style.minHeight = document.body.offsetHeight + "px";
    if (allheader != null) {
      contentdiv.style.minHeight = document.body.offsetHeight - allheader.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    } else {
      contentdiv.style.minHeight = document.body.offsetHeight - document.getElementById("footer").offsetHeight + "px";
    }
</script>
    </div>
    <!-- <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
    <a href="/categories" class="mobile-nav-link">Categories</a>
  
    <a href="/tags" class="mobile-nav-link">Tags</a>
  
    <a href="/about" class="mobile-nav-link">About</a>
  
    <a href="http://luoli-luoli.com/chat" class="mobile-nav-link">Chat</a>
  
</nav> -->
    

<!-- mathjax config similar to math.stackexchange -->

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],
      processEscapes: true
    }
  });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
</script>

<script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for(i=0; i < all.length; i += 1) {
            all[i].SourceElement().parentNode.className += ' has-jax';
        }
    });
</script>

<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/scripts.js"></script>




  <script src="/js/dialog.js"></script>








	<div style="display: none;">
    <script src="https://s95.cnzz.com/z_stat.php?id=1260716016&web_id=1260716016" language="JavaScript"></script>
  </div>



	<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
	</script>






  </div>

  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h2 class="modal-title" id="myModalLabel">设置</h2>
      </div>
      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">


      <div class="modal-body">
          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" onclick="javascript:setFontSize();" aria-expanded="true" aria-controls="collapseOne">
              正文字号大小
            </a>
          </div>
          <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
          <div class="panel-body">
            您已调整页面字体大小
          </div>
        </div>
      


          <div style="margin:6px;">
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" onclick="javascript:setBackground();" aria-expanded="true" aria-controls="collapseTwo">
              夜间护眼模式
            </a>
        </div>
          <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo">
          <div class="panel-body">
            夜间模式已经开启，再次单击按钮即可关闭 
          </div>
        </div>

        <div>
            <a data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;关 于&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>
        </div>
         <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree">
          <div class="panel-body">
            Jin Tian
          </div>
          <div class="panel-body">
            Copyright © 2018 Jintian All Rights Reserved.
          </div>
        </div>
      </div>


      <hr style="margin-top:0px; margin-bottom:0px; width:80%; border-top: 1px solid #000;">
      <hr style="margin-top:2px; margin-bottom:0px; width:80%; border-top: 3px solid #000;">
      <div class="modal-footer">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
      </div>
    </div>
  </div>
</div>
  
  <a id="rocket" href="#top" class=""></a>
  <script type="text/javascript" src="/js/totop.js?v=1.0.0" async=""></script>
  
    <a id="menu-switch"><i class="fa fa-bars fa-lg"></i></a>
  
</body>
</html>